﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="news_window_list.aspx.cs" Inherits="Ccit.OA.NewsCenter.news_window_list" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.1" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxwgv" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>信息中心-窗口管理</title>
    <script language="javascript" src="../script/jquery.js" type="text/javascript"></script>
    <script language="javascript" src="../script/StringClass_Ext.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jsonlib.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jcontrol.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
      //新增
      
      function doAddNew(){
         var Type=$get("_hidType").value;
         
         var vPageParam = "Type="+Type+"&TABID="+document.getElementById("_hidTabId").value;
	     var encodeParam = base64encode(vPageParam);
         self.document.location="news_window_frame.aspx?" + encodeParam;
      }
      //delete
      function doRemove(plateId)
      {
        var vType = document.getElementById("_hidType").value;
        if(confirm("确定要删除吗?"))
          PageMethods.RemovePlate(plateId,vType,CilentCallBack);
      }
      function CilentCallBack(vResult)
      {
         eval("var vResultObj="+vResult);
         if(vResultObj.resFlag > 0){
            alert(vResultObj.resMes);
            var Type = document.getElementById("_hidType").value;
            var vPageParam = "Type="+Type+"&TABID="+document.getElementById("_hidTabId").value;
	        var encodeParam = base64encode(vPageParam);
            self.document.location="news_window_list.aspx?"+encodeParam;
         }
      }
    </script>
</head>
<body>
    <ccit:ActionForm id="form1" runat="server">
    
    <input type="hidden" runat="server" id="_hidTabId" />
    
    <input type="hidden" id="_hidType" runat="server" value=""/>
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <table class="tbToolbar" cellpadding="0" cellspacing="0" width="98%" align="center">
                    <tr>
                    <td align="left">
                            &nbsp;</td>
                        <td width="100%" class="titlebar">
                            信息管理-> 信息窗口管理
                        </td>
                        <td align="left">
                            &nbsp;</td>
                        <td align="right">
                            <nobr>
                              窗口名称
                              <input type="text" value="" id="txtWinName" runat="server" class="input"  style="width:150px"/> 
                              <asp:LinkButton ID="lnbSearch" CssClass="linktext" runat="server" 
                                onclick="lnbSearch_Click" >
                              <img src="../images/toolbar/search.gif" />
                              查询  
                              </asp:LinkButton>
                            </nobr>
                        </td>
                        <td align="right">
                            <nobr>
                                &nbsp;
                                <a href="javascript:doAddNew()" class="linktext">
                                    <img src="../images/toolbar/addnew_bq.gif" />新增
                                </a>
                            </nobr>
                        </td>
                    </tr>
                </table>
    <table cellpadding="0" cellspacing="0" border="0" width="98%"  align="center" valign="top">
      <tr>
       <td>
         <dxwgv:ASPxGridView ID="gvWindowList" runat="server" Width="100%" 
               KeyFieldName="PlateId" onhtmlrowcreated="gvWindowList_HtmlRowCreated" >
          <Columns>
            <dxwgv:GridViewDataTextColumn Caption="序号" FieldName="" VisibleIndex="1">
              <HeaderStyle HorizontalAlign="center" />
                <CellStyle HorizontalAlign="center" Wrap="False">
                </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="信息窗口名称" FieldName="PlateName" VisibleIndex="2">
              <HeaderStyle HorizontalAlign="Center" />
              <CellStyle HorizontalAlign="Center" Wrap="False">
              </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="显示条数" FieldName="ShowNum" VisibleIndex="3">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption=""  Visible="false" FieldName="ShowNum" VisibleIndex="4">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption="显示创建人" FieldName="ShowCreateor" VisibleIndex="5">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption=""  Visible="false" FieldName="ShowCreateor" VisibleIndex="6">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption="显示时间" FieldName="ShowPubTime" VisibleIndex="7">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption=""  Visible="false" FieldName="ShowPubTime" VisibleIndex="8">
             <HeaderStyle HorizontalAlign="Center" />
             <CellStyle HorizontalAlign="Center" Wrap="False">
             </CellStyle>
            </dxwgv:GridViewDataTextColumn>
            
            <dxwgv:GridViewDataTextColumn Caption="操作" FieldName="" VisibleIndex="9" Width="10%">
              <HeaderStyle HorizontalAlign="Center" />
              <CellStyle HorizontalAlign="Center" Wrap="False">
              </CellStyle>
                <DataItemTemplate>
                    <nobr>
                      <a href="" id="aEdit" runat="server">编辑</a>
                      <a href="" id="aDel" runat="server">删除</a>
                    </nobr>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
          </Columns>
          
          <SettingsPager PageSize=13 Mode="ShowPager" AlwaysShowPager=true
                 FirstPageButton-Visible=true LastPageButton-Visible=true  
                 FirstPageButton-Image-AlternateText="" LastPageButton-Image-AlternateText="灏鹃〉"
                 NumericButtonCount=5  SEOFriendly="Disabled"
                 PrevPageButton-Visible="true" NextPageButton-Visible="true"
                 ShowSeparators=true Position="Bottom"></SettingsPager>
            <Styles>
                <Row CssClass=""></Row>
                <AlternatingRow  CssClass="" Enabled="true"/>
                <SelectedRow  CssClass=""></SelectedRow>                
            </Styles>
            <Settings ShowFilterRow="false" ShowPreview="True"/>
            <SettingsCustomizationWindow Enabled="true" />
        </dxwgv:ASPxGridView>
       </td>
      </tr>
    </table>
    </ccit:ActionForm>
</body>
</html>
